Skip to content

Follow-ups: ledger_merge.py sync, two environment-proof test fixes, 6 intake prompts - #540

Merged
Jammy2211 merged 5 commits into
mainfrom
ccr-f98d2a4d-92r7rv
Nov 5, 2026
Merged

Jammy2211 merged 5 commits into
mainfrom
ccr-f98d2a4d-92r7rv

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

These are follow-ups from the 2026-11-05 queue session, which landed in #539 and PyAutoBrain#588. The branch was restarted from main, because #539 had already merged.

Shipped here and closed in this PR

Record Change
ledger-merge-sync New scripts/ledger_merge.py sync [--base origin/main], the local twin of mind_ledger_merge.yml. It is for branches that workflow skips: ccr-* session branches and PR branches that hold code.
bootstrap-test-root-skip test_the_hook_survives_an_unwritable_tools_dir now skips with a reason when root ignores the chmod, instead of failing because of the environment.
root-default-test-env-leak The autouse fixture clears PYAUTO_ROOT / PYAUTO_ROOT_REASON, so an exported operator override can't leak into the test.

What sync does:

  1. Refuses to run on a dirty tree.
  2. Merges the base with --no-commit --no-ff.
  3. Settles conflicts with resolve: registries merge by entry, and generated files are taken from either side, since step 5 regenerates them.
  4. Stops with the merge in progress if anything is left that the ledger grammar can't settle.
  5. Otherwise re-renders complete/index.md and the dashboard on the merged tree, using the Brain renderer from $PYAUTO_BRAIN or a sibling PyAutoBrain.
  6. Leaves the merge staged for the caller to commit.

It's documented in REFERENCE.md under "How the ledger lands".

Why it's needed: #539 needed three rounds of conflict resolution by hand on the generated files, and one round kept main's stale complete/index.md, which turned the drift check red. A .gitattributes merge driver wouldn't help, because GitHub ignores custom drivers.

Already used for real: fa020fa96 is a sync of this very branch. All four generated files conflicted, and all were settled and regenerated automatically.

The resolve message no longer says "main's copy". On a branch sync, git's "ours" is the branch, and the files are regenerated anyway.

Filed, not started (d4d7c6641)

  • feature/autolens_profiling/write_compile_repeats_from_autolens_profiling_s.md: makes PyAutoBrain#588's single-sample caveat rest on evidence.
  • test/autofit/regression_test_nautilus_as_the_ep_default.md: the EP regression test the superseded draft never got.
  • bug/pyautobrain/intake_injects_memory_citations_that_match_on.md: a score floor for intake's Memory: citations. While filing these prompts, intake again added unrelated science citations, which I removed by hand from the two library/workspace prompts.

Not done here: letting the auto-merge workflow handle ccr-* session branches. That's a policy call for a human.

Validation

  • Mind suite: 728 passed, 1 skipped, with and without PYAUTO_ROOT exported. This is the first fully green local run today.
  • tests/test_ledger_merge.py: 31 passed, including 3 new sync tests: ready path, up-to-date no-op and dirty-tree refusal, and a blocked conflict.
  • lifecycle.py check OK, index --check OK, dashboard --check current.

Tier: judge. The PR holds code, so it needs a human /prm.


Generated by Claude Code

- bug/pyautomind: bootstrap test fails as root; root-default test inherits PYAUTO_ROOT
- feature/pyautomind: ledger_merge.py sync for branches the ledger-merge workflow skips
- feature/autolens_profiling: write compile_repeats (makes PyAutoBrain#588's caveat evidence-based)
- test/autofit: EP + Nautilus default_optimiser regression test
- bug/pyautobrain: intake Memory: citation score floor
Vocabulary-only Memory: lines removed by hand from the autolens_profiling and autofit prompts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MZyNga1wamBmFdfAK
…n root-default tests; add ledger_merge.py sync

- test_session_bootstrap: probe os.access after chmod, skip with a reason when
  the directory stays writable (root ignores mode bits).
- test_repos_sync_root_default: autouse fixture deletes PYAUTO_ROOT /
  PYAUTO_ROOT_REASON so an exported operator override cannot leak in.
- ledger_merge.py sync [--base origin/main]: --no-commit merge, resolve,
  re-render index + dashboard on the merged tree, stage for the caller —
  the local twin of mind_ledger_merge.yml for ccr-*/code branches. Documented
  in REFERENCE.md 'How the ledger lands'; 3 new tests.
Mind suite 728 passed, 1 skipped (with and without PYAUTO_ROOT exported).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MZyNga1wamBmFdfAK
…erge-sync (shipped in this PR)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MZyNga1wamBmFdfAK
…e merged tree)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MZyNga1wamBmFdfAK
…, 'ours' is the branch)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MZyNga1wamBmFdfAK
@Jammy2211
Jammy2211 merged commit 051a1ea into main Nov 5, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the ccr-f98d2a4d-92r7rv branch November 5, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants